package com.qch.service.impl;

import com.qch.service.HelloService;
import org.apache.dubbo.config.annotation.Service;

import java.util.concurrent.TimeUnit;

/**
 * @Author qch
 * @Date 2021/2/9
 */
@Service
public class HelloServiceImpl implements HelloService {
    @Override
    public String sayHello(String message, int timeToWait) {
       /* try {
            Thread.sleep(timeToWait);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }*/
       //provider不动但是consumer会不断压过来
        /*try {
            TimeUnit.SECONDS.sleep(1);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }*/
        return "hello2"+message;
    }
}
